<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>

<%@ page
	import="universal.schema.action.*,java.util.*,universal.schema.model.*,com.opensymphony.xwork2.ActionContext"%>

<link href="ViewResources/css/pager.css" rel="stylesheet">

<script type="text/javascript">
	$(function() {
		$("#tabs").tabs({
			selected : 1,
			disabled : [ 0, 2, 3, 4, 5 ]
		});
	});
	
	function preloader() {
		document.getElementById("loading").style.display = "none";
	}
	window.onload = preloader;
	
	function onLinkClick() {
		document.getElementById("Button1").style.display = "none";
		document.getElementById("Button2").style.display = "none";
		document.getElementById("loading").style.display = "block";
	}
</script>
</head>

<body>
	<div>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1"><font style="font-size: 20px;">1</font>&nbsp;<font
						style="font-size: 12px">Select Tables</font></a></li>
				<!-- 0 -->
				<li><a href="#tabs-2"><font
						style="font-size: 20px; color: #FFAD00;">2</font>&nbsp;<font
						style="font-size: 12px">Select Columns</font></a></li>
				<!-- 1 -->
				<li><a href="#tabs-2.5"><font style="font-size: 20px;">3</font>&nbsp;<font
						style="font-size: 12px">Choice</font></a></li>
				<!-- 2 -->
				<li><a href="#tabs-3"><font style="font-size: 20px;">4</font>&nbsp;<font
						style="font-size: 12px">Select Filters</font></a></li>
				<!-- 3 -->
				<li><a href="#tabs-4"><font style="font-size: 20px;">5</font>&nbsp;<font
						style="font-size: 12px">View Query</font></a></li>
				<!-- 4 -->
				<li><a href="#tabs-5"><font style="font-size: 20px;">6</font>&nbsp;<font
						style="font-size: 12px">Query Results</font></a></li>
				<!-- 5 -->
			</ul>

			<!-- ================ Show Columns tab content================ -->
			<div id="tabs-2">

				<s:if test="hasActionErrors()">
					<br />
					<s:iterator value="actionErrors">
						<div class="alert alert-warning" id="errorMsg">
							<button type="button" class="close" data-dismiss="alert">&times;</button>
							<s:property />
						</div>
					</s:iterator>
				</s:if>

				<s:form method="post">
					<!-- <div class="scroll"> -->
					<table class="table table-striped table-bordered">
						<tr>
							<th>Select</th>
							<th>Information Regarding</th>

						</tr>

						<!-- Nested s:iterator -->
						<s:iterator value="selectedNodesList">

							<s:iterator value="tblObj.columns">

								<tr>
									<!-- showing all the non PK/FK columns -->
									<s:if test="%{dataType == 'NK'}">

										<td><s:checkbox name="checkColumns"
												fieldValue="%{colName}" value="%{colName in checkColumns}"
												theme="simple" /></td>

										<td><s:property value="colName" /></td>
									</s:if>
								</tr>

							</s:iterator>
						</s:iterator>

					</table>

					<!-- This is the loader window -->
					<div id="loading" style="display: none" align="center"></div>

					<!-- Submit buttons -->
					<s:submit cssClass="btn btn-primary" value="Next" align="left"
						action="checkWhere" id="Button1" onclick="onLinkClick()" />
					<s:submit cssClass="btn btn-danger" value="Quit" align="right"
						action="RestartWork" id="Button2" />
				</s:form>
			</div>
		</div>
	</div>
</body>
</html>